Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not trigger hotkeys when modals are opened #6800

Merged
merged 21 commits into from
Sep 6, 2023
Merged

Conversation

bsekachev
Copy link
Member

@bsekachev bsekachev commented Sep 4, 2023

Motivation and context

Resolved #6788 + better UX because now you can use focus and enter/space/tab on modal windows
Additionally, minor fix for #6612 (resolved #6612)
Better focus handling when remove locked object/issue or changing workspace

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have added a description of my changes into the CHANGELOG file
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@bsekachev bsekachev changed the title Do not trigger hotkeys when modals are opened [WIP] Do not trigger hotkeys when modals are opened Sep 4, 2023
@bsekachev bsekachev changed the title [WIP] Do not trigger hotkeys when modals are opened Do not trigger hotkeys when modals are opened Sep 5, 2023
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #6800 (2d25e5b) into develop (84c0816) will increase coverage by 0.03%.
Report is 5 commits behind head on develop.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #6800      +/-   ##
===========================================
+ Coverage    82.46%   82.49%   +0.03%     
===========================================
  Files          366      366              
  Lines        39761    39759       -2     
  Branches      3545     3542       -3     
===========================================
+ Hits         32787    32798      +11     
+ Misses        6974     6961      -13     
Components Coverage Δ
cvat-ui 77.49% <100.00%> (+0.06%) ⬆️
cvat-server 86.87% <ø> (ø)

Copy link
Contributor

@klakhov klakhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add closing settings modal when opening a shortcut model. Now I can open two windows with f1/f2 and it looks strange
settings-shortcuts

cvat-ui/src/utils/mousetrap-react.tsx Outdated Show resolved Hide resolved
@bsekachev
Copy link
Member Author

bsekachev commented Sep 6, 2023

I think we need to add closing settings modal when opening a shortcut model. Now I can open two windows with f1/f2 and it looks strange

Now user not able to open both settings and shortcuts. Plus added some refactoring for outdated code

@klakhov
Copy link
Contributor

klakhov commented Sep 6, 2023

I think we need to move settings modals a bit higher, now Im getting scrollbar on FullHD screen
settings-shortcuts2

@bsekachev
Copy link
Member Author

@klakhov

Did not you scale the browser? For me on full hd it is allright.
Or maybe you have system scale 125%?

@bsekachev
Copy link
Member Author

@klakhov

BTW in your previous comment it was fine :)

@klakhov
Copy link
Contributor

klakhov commented Sep 6, 2023

It seems table changes after I change scaling. And remains the same even if I turn back to 100%
settings-shortcuts5

@bsekachev
Copy link
Member Author

@klakhov

Moved scrolling into the table. Now it should work better even for smaller screens:

image

@azhavoro azhavoro merged commit 943fbcb into develop Sep 6, 2023
32 checks passed
@azhavoro azhavoro mentioned this pull request Sep 6, 2023
nmanovic added a commit that referenced this pull request Sep 6, 2023
### Added

- Gamma correcton filter (<#6771>)
- Introduced the feature to hide or show objects in review mode (<#6808>)

### Changed

- \[Helm\] Database migrations are now executed as a separate job,
  rather than in the server pod, to mitigate the risk of data
  corruption when using multiple server replicas
  (<#6780>)
- Clicking multiple times on icons in the left
  sidebar now toggles the corresponding popovers open and closed
  (<#6817>)
- Transitioned to using KeyDB with FLASH for data
  chunk caching, replacing diskcache (<#6773>)

### Removed

- Removed outdated use of hostnames when accessing Git, OpenCV, or analytics via the UI (<#6799>)
- Removed the Feedback/Share component (<#6805>)

### Fixed

- Resolved the issue of the canvas zooming while scrolling
  through the comments list in an issue (<#6758>)
- Addressed the bug that allowed for multiple issue
  creations upon initial submission (<#6758>)
- Fixed the issue of running deep learning models on
  non-JPEG compressed TIFF images (<#6789>)
- Adjusted padding on the tasks, projects, and models pages (<#6778>)
- Corrected hotkey handlers to avoid overriding default behavior when modal windows are open
  (<#6800>)
- Resolved the need to move the mouse to activate
  brush or eraser effects; a single click is now sufficient (<#6800>)
- Fixed a memory leak issue in the logging system (<#6804>)
- Addressed a race condition that occurred during the initial creation of `secret_key.py`
  (<#6775>)
- Eliminated duplicate log entries generated by the CVAT server
  (<#6766>)
@bsekachev bsekachev deleted the bs/fixed_issue_6788 branch September 7, 2023 07:53
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Oct 25, 2023
<!-- Raise an issue to propose your change
(https://github.com/opencv/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution
guide](https://opencv.github.io/cvat/docs/contributing/). -->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
Resolved cvat-ai#6788 + better UX because now you can use focus and
enter/space/tab on modal windows
Additionally, minor fix for cvat-ai#6612 (resolved cvat-ai#6612)
Better focus handling when remove locked object/issue or changing
workspace

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [x] I have added a description of my changes into the
[CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md)
file
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- [ ] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.

---------

Co-authored-by: Kirill Lakhov <kirill.9992@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: When in Review Mode, Writing and Issue and Auto Save Suggestion: ClickEraser while Editing
3 participants